package curd

import (
	"fmt"
	"gctl/pkg"
	"github.com/spf13/cobra"
)

type Param struct {
	App  string
	Srv  string
	Path string
}

func CurdRoute(cmd *cobra.Command, args []string) {
	curd, err := cmd.Flags().GetString("curd")
	if err != nil {
		fmt.Println(err)
		return
	}
	app, err := cmd.Flags().GetString("app")
	if err != nil {
		fmt.Println(err)
		return
	}
	pkg.CurdFile(app, curd)
}
